from django.db import models
from device.models import Device


class Logger(models.Model):
    deviceId = models.ForeignKey(Device, on_delete=models.CASCADE)
    content = models.JSONField(verbose_name='内容')
    createTime = models.DateTimeField(auto_now=True, verbose_name='创建时间')

    def __str__(self):
        return '%s——%s' % (self.deviceId, self.createTime)
